﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CloudDcPc.Util
{
    class CommonUtil
    {
        /**
         * 获得点餐时间类型
         * 8:00~14:00是中餐
         */
        public static int getOrderTimeType()
        {
            DateTime now = DateTime.Now;
            int h = now.Hour;
            if (h < 8 && h>1)
                return 1;
            else if (h >=8 && h<=14)
                return 2;
            else
                return 3;
        }
    }
}
